FROM python:3.9-buster

RUN echo "deb https://mirrors.aliyun.com/debian/ buster main contrib non-free" > /etc/apt/sources.list && \
    echo "deb https://mirrors.aliyun.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list && \
    echo "deb https://mirrors.aliyun.com/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list && \
    echo "deb https://mirrors.aliyun.com/debian-security/ buster/updates main contrib non-free" >> /etc/apt/sources.list

RUN apt-get update -y && apt-get install -y curl
RUN #curl -fsSL https://code-server.dev/install.sh | sh

RUN apt-get install -y \
      git gcc wget gzip busybox sudo

RUN useradd user
RUN mkdir /home/user
RUN chown user /home/user

USER user
RUN #code-server --install-extension ms-python.python

RUN echo ". ~/.profile" > /home/user/.bashrc
RUN echo "PS1='\W\\$ '" > /home/user/.bashrc


USER root
#RUN busybox --install /bin
#RUN chsh -s bash

#CMD bash -c "code-server --bind-addr 0.0.0.0:8443 --auth password "
CMD bash -c "sleep 1000000000000000000000000000000000000000000"